package servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.NguoiDungDAO;

/**
 * Servlet implementation class dangky
 */
public class dangky extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public dangky() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		String ten = request.getParameter("ten");
		String taikhoan = request.getParameter("taikhoan");
		String pass = request.getParameter("pass");
		String re_pass = request.getParameter("re_pass");
		String gioitinh = request.getParameter("gioitinh");
		String ngaysinh = request.getParameter("ngaysinh");
//		String url = "jdbc:sqlserver://localhost:1433;databaseName="+"Project_QLNHAC_ONLINE";
		System.out.println("thet lap kn");
		NguoiDungDAO a = new NguoiDungDAO();
		a.kiemTraDangNhap(ten, pass);
	}

}
